﻿namespace Softserve.Pottery.Manufacturing.Domains
{
    using System.Collections.Generic;
    using System.Data.Services.Common;
    using System.Runtime.Serialization;
    using Softserve.Pottery.Infrastructure;
    using Softserve.Pottery.Infrastructure.Interfaces;

    [DataContract]
    [DataServiceEntity]
    public class Approvement : IValidatable, IDomain
    {
        #region Properties

        [DataMember]
        public int Id
        {
            get { return m_Id; }
            set { m_Id = value; }
        }

        [DataMember]
        public int MasterId
        {
            get { return m_MasterId; }
            set { m_MasterId = value; }
        }

        [DataMember]
        public int BatchId
        {
            get { return m_Batch; }
            set { m_Batch = value; }
        }

        [DataMember]
        public ProductionStage CurrentStage
        {
            get { return M_CurrentStage; }
            set { M_CurrentStage = value; }
        }

        [DataMember]
        public List<int> ProductsId
        {
            get { return m_ProductsId; }
            set { m_ProductsId = value; }
        }

        [DataMember]
        public bool Approved
        {
            get { return m_Approved; }
            set { m_Approved = value; }
        }


        #endregion

        #region Methods

        public bool Validate()
        {
            return true;
        }

        #endregion

        #region Fields

        private int m_Id = default(int);

        private int m_MasterId = default(int);

        private int m_Batch = default(int);

        private ProductionStage M_CurrentStage = ProductionStage.Started;

        private int m_QuantityAfterModeling = default(int);

        private int m_QuantityAfterRoasting = default(int);

        private int m_QuantityPainting = default(int);

        private List<int> m_ProductsId = new List<int>();

        private bool m_Approved = false;

        #endregion
    }
}
